package qrcode;

import java.util.Iterator;

public class QRSequenceBitIterator implements Iterator<Boolean> {

  private int pos;

  private QRSequence data;

  public QRSequenceBitIterator(QRSequence data) {
    this.data = data;
    this.pos = 0;
  }

  @Override
  public boolean hasNext() {
    return pos < data.getLengthInBits();
  }

  @Override
  public Boolean next() {
    return Boolean.valueOf(data.getSequenceBit(pos++));
  }

  @Override
  public void remove() {
  }
}